#include "conio.h"
#include "stdio.h"

struct GRAPH
{
	int n;
	int **L;
};

void ReadFile(GRAPH &);
void XuatDoThi(GRAPH);

void main()
{
	GRAPH g;
	ReadFile(g);
	XuatDoThi(g);
	getch();
}

void ReadFile(GRAPH &g)
{
	FILE *f;
	f=fopen("input.txt","rt");
	if(f==NULL)
	{
		g.n=0;
		return;
	}
	fscanf(f,"%d",&g.n);
	g.L=new int*[g.n];
	for(int i=0;i<g.n;i++)
	{
		g.L[i]=new int[g.n];
		for(int j=0;j<g.n;j++)
			fscanf(f,"%d",&g.L[i][j]);
	}
	fclose(f);

}
void XuatDoThi(GRAPH g)
{
	for(int i=0;i<g.n;i++)
	{
		for(int j=0;j<g.n;j++)
			printf("%3d",g.L[i][j]);
		printf("\n");
	}
}
void FindTour(GRAPH &g, int dinh)
{
	for(int i=0;i<g.n;i++)
	{
		for(int j=0;j<g.n;j++)
		{
			if(g.L[i][j]!=0)
				FindTour(g,j);
		}
	}
}